//1、引入EventEmitter构造函数
const events=require("events");
const EventEmitter=events.EventEmitter;
//2、进行事件对象的实例化
let eventObj=new EventEmitter();
//3、事件的监听
eventObj.on("hello",(arg)=>{
    console.log(args);
    console.log("node events")
});
//4、事件的触发
eventObj.emit("hello",["test"])